#include <bits/stdc++.h>
using namespace std;

void solve(){
    int x, y, k;
    cin >> x >> y >> k;
    int t = min(x, y);
    cout << 0 << ' ' << 0 << ' ' << t << ' ' << t << endl;
    cout << 0 << ' ' << t << ' ' << t << ' ' << 0 << endl;

}

int main(){
    ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
    int t;
    cin >> t;
    while(t--) solve();
    return 0;
}